package com.etc.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.etc.dao.CityMapper;
import com.etc.entity.City;
import com.etc.service.CityService;
@Service
public class CityServiceImpl implements CityService{

	@Resource
	CityMapper cmapper;
	
	//根据省份Id查询所有的城市
	@Override
	public List<City> findCityByPid(int pid) {
		
		return cmapper.selectBypId(pid);
	}

	//通过城市编号Id查询城市的信息
	@Override
	public City findcityByCid(int cid) {
		// TODO Auto-generated method stub
		return cmapper.selectByCityId(cid);
	}

}
